#
# Enable either or both of these as you wish.
#
-OPTIMIZATION=-O $(EXTRA_OPTIMIZATION)
+OPTIMIZATION=-O -W $(EXTRA_OPTIMIZATION)
DEBUGGING=-g $(EXTRA_DEBUGGING)
# add -DDEBUG_MEM to turn on memory allocation logging
CFLAGS=$(EXTRA_CFLAGS) $(DEBUGGING) -Icoldsync $(INHIBIT_EXPAT) $(INHIBIT_USB) $(OPTIMIZATION)
static
arglist_t an1_args[] = {
{"type", &output_type, "Type of .an1 file (see README)",
- "", ARGTYPE_STRING },
+ "", ARGTYPE_STRING, ARG_NOMINMAX },
{"road", &road_changes, "Road type changes (see README)",
- "", ARGTYPE_HIDDEN | ARGTYPE_STRING },
+ "", ARGTYPE_HIDDEN | ARGTYPE_STRING, ARG_NOMINMAX },
{"nogc", &nogc, "Do not add geocache data to description",
- NULL, ARGTYPE_BOOL },
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
{"deficon", &opt_symbol, "Symbol to use for point data",
- "Red Flag", ARGTYPE_STRING },
+ "Red Flag", ARGTYPE_STRING, ARG_NOMINMAX },
{"color", &opt_color, "Color for lines or mapnotes",
- "red", ARGTYPE_STRING },
+ "red", ARGTYPE_STRING, ARG_NOMINMAX },
{"zoom", &opt_zoom, "Zoom level to reduce points",
- NULL, ARGTYPE_INT },
+ NULL, ARGTYPE_INT, ARG_NOMINMAX },
{"wpt_type", &opt_wpt_type,
"Waypoint type (marker,text,mapnote,circle)",
- "", ARGTYPE_STRING },
+ "", ARGTYPE_STRING, ARG_NOMINMAX },
{"radius", &opt_radius, "Radius for circles",
- NULL, ARGTYPE_STRING },
- {0, 0, 0, 0 }
+ NULL, ARGTYPE_STRING, ARG_NOMINMAX },
+ ARG_TERMINATOR
};
typedef struct guid {
static
arglist_t arcdist_args[] = {
{"file", &arcfileopt, "File containing vertices of arc",
- NULL, ARGTYPE_FILE | ARGTYPE_REQUIRED},
+ NULL, ARGTYPE_FILE | ARGTYPE_REQUIRED, ARG_NOMINMAX},
{"distance", &distopt, "Maximum distance from arc",
- NULL, ARGTYPE_FLOAT | ARGTYPE_REQUIRED},
+ NULL, ARGTYPE_FLOAT | ARGTYPE_REQUIRED, ARG_NOMINMAX},
{"exclude", &exclopt, "Exclude points close to the arc", NULL,
- ARGTYPE_BOOL},
+ ARGTYPE_BOOL, ARG_NOMINMAX},
{"points", &ptsopt, "Use distance from vertices not lines",
- NULL, ARGTYPE_BOOL},
- {0, 0, 0, 0, 0}
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
+ ARG_TERMINATOR
};
#define BADVAL 999999
static
arglist_t bcr_args[] = {
{"index", &rtenum_opt, "Index of route to write (if more the one in source)", NULL, ARGTYPE_INT, "1", NULL },
- {"name", &rtename_opt, "New name for the route", NULL, ARGTYPE_STRING },
- {"radius", &radius_opt, "Radius of our big earth (default 6371000 meters)", "6371000", ARGTYPE_FLOAT },
- {0, 0, 0, 0, 0}
+ {"name", &rtename_opt, "New name for the route", NULL, ARGTYPE_STRING, ARG_NOMINMAX },
+ {"radius", &radius_opt, "Radius of our big earth (default 6371000 meters)", "6371000", ARGTYPE_FLOAT, ARG_NOMINMAX },
+ ARG_TERMINATOR
};
static void
}
static arglist_t brauniger_iq_args[] = {
- {0, 0, 0, 0, 0}
+ ARG_TERMINATOR
};
ff_vecs_t brauniger_iq_vecs = {
static
arglist_t cetus_args[] = {
- {"dbname", &dbname, "Database name", NULL, ARGTYPE_STRING },
+ {"dbname", &dbname, "Database name", NULL, ARGTYPE_STRING,
+ ARG_NOMINMAX },
{"appendicon", &appendicon, "Append icon_descr to description",
- NULL, ARGTYPE_BOOL },
- {0, 0, 0, 0 }
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+ ARG_TERMINATOR
};
static waypoint *
static
arglist_t compegps_args[] = {
{"deficon", &option_icon, "Default icon name",
- NULL, ARGTYPE_STRING},
+ NULL, ARGTYPE_STRING, ARG_NOMINMAX },
{"index", &option_index, "Index of route/track to write (if more the one in source)",
NULL, ARGTYPE_INT, "1", NULL},
{"radius", &option_radius, "Give points (waypoints/route points) a default radius (proximity)",
NULL, ARGTYPE_FLOAT, "0", NULL},
{"snlen", &option_snlen, "Length of generated shortnames (default 16)",
"16", ARGTYPE_INT, "1", NULL},
- {0, 0, 0, 0, 0}
+ ARG_TERMINATOR
};
/* specialized readers */
static
arglist_t coto_args[] = {
- {"zerocat", &zerocat, "Name of the 'unassigned' category", NULL, ARGTYPE_STRING },
- {"internals", &internals, "Export some internal stuff to notes", NULL, ARGTYPE_STRING | ARGTYPE_HIDDEN },
- {0, 0, 0, 0, 0 }
+ {"zerocat", &zerocat, "Name of the 'unassigned' category", NULL,
+ ARGTYPE_STRING, ARG_NOMINMAX },
+ {"internals", &internals, "Export some internal stuff to notes", NULL,
+ ARGTYPE_STRING | ARGTYPE_HIDDEN, ARG_NOMINMAX },
+ ARG_TERMINATOR
};
static void
static
arglist_t cst_args[] = {
- {0, 0, 0, 0, 0}
+ ARG_TERMINATOR
};
/* helpers */
time_t
sscanftime( const char *s, const char *format, const int gmt )
{
- struct tm stm = {0,0,0,0,0,0,0,0,0};
+ struct tm stm;
+ memset(&stm, 0, sizeof(stm));
+
if ( strptime( s, format, &stm ) )
{
stm.tm_isdst = -1;
static
arglist_t cvttype_skeleton_args[] = {
{"action", &action, "Type of conversion to perform", "wpttotrk",
- ARGTYPE_STRING} ,
- {0, 0, 0, 0, 0}
+ ARGTYPE_STRING, ARG_NOMINMAX} ,
+ ARG_TERMINATOR
};
#define ARGTYPE_TYPEMASK 0x00000fff
#define ARGTYPE_FLAGMASK 0xfffff000
+#define ARG_NOMINMAX NULL, NULL
+#define ARG_TERMINATOR {0, 0, 0, 0, 0, ARG_NOMINMAX}
+
typedef struct arglist {
char *argstring;
char **argval;
{
double alt_feet = wpt->altitude / .3048;
int status = 3;
- gpl_point_t gp = {0};
+ gpl_point_t gp;
+
+ memset(&gp, 0, sizeof(gp));
le_write32(&gp.status, status);
le_read64(&gp.lat, &wpt->latitude);
le_read64(&gp.lon, &wpt->longitude);
static
arglist_t fix_args[] = {
{"hdop", &hdopopt, "Suppress waypoints with higher hdop",
- "-1.0", ARGTYPE_BEGIN_REQ | ARGTYPE_FLOAT},
+ "-1.0", ARGTYPE_BEGIN_REQ | ARGTYPE_FLOAT, ARG_NOMINMAX},
{"vdop", &vdopopt, "Suppress waypoints with higher vdop",
- "-1.0", ARGTYPE_END_REQ | ARGTYPE_FLOAT},
+ "-1.0", ARGTYPE_END_REQ | ARGTYPE_FLOAT, ARG_NOMINMAX},
{"hdopandvdop", &andopt, "Link hdop and vdop supression with AND",
- NULL, ARGTYPE_BOOL},
- {0, 0, 0, 0, 0}
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
+ ARG_TERMINATOR
};
/*
static
arglist_t dup_args[] = {
{"shortname", &snopt, "Suppress duplicate waypoints based on name",
- NULL, ARGTYPE_BEGIN_REQ | ARGTYPE_BOOL},
+ NULL, ARGTYPE_BEGIN_REQ | ARGTYPE_BOOL, ARG_NOMINMAX},
{"location", &lcopt, "Suppress duplicate waypoint based on coords",
- NULL, ARGTYPE_END_REQ | ARGTYPE_BOOL},
+ NULL, ARGTYPE_END_REQ | ARGTYPE_BOOL, ARG_NOMINMAX},
{"all", &purge_duplicates, "Suppress all instances of duplicates",
- NULL, ARGTYPE_BOOL},
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
{"correct", &correct_coords, "Use coords from duplicate points",
- NULL, ARGTYPE_BOOL},
- {0, 0, 0, 0, 0}
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
+ ARG_TERMINATOR
};
arglist_t easygps_args[] = {
/* {"deficon", &deficon, "Default icon name", "Waypoint",
ARGTYPE_STRING}, */
- {0, 0, 0, 0 }
+ ARG_TERMINATOR
};
static void
static
arglist_t filter_skeleton_args[] = {
// {"foo", &fooopt, "The text of the foo option in help",
-// "default", ARGYTPE_STRING} ,
- {0, 0, 0, 0, 0}
+// "default", ARGYTPE_STRING, ARG_NOMINMAX} ,
+ ARG_TERMINATOR
};
/*******************************************************************************
static
arglist_t format_skeleton_args[] = {
// {"foo", &fooopt, "The text of the foo option in help",
-// "default", ARGYTPE_STRING} ,
- {0, 0, 0, 0, 0}
+// "default", ARGYTPE_STRING, ARG_NOMINMAX} ,
+ ARG_TERMINATOR
};
/*******************************************************************************
{ "snlen", &snlen, "Length of generated shortnames", NULL,
ARGTYPE_INT, "1", NULL },
{ "snwhite", &snwhiteopt, "Allow whitespace synth. shortnames",
- NULL, ARGTYPE_BOOL},
- { "deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING },
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
+ { "deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING, ARG_NOMINMAX },
{ "get_posn", &getposn, "Return current position as a waypoint",
- NULL, ARGTYPE_BOOL},
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
{ "power_off", &poweroff, "Command unit to power itself down",
- NULL, ARGTYPE_BOOL},
- { 0, 0, 0, 0, 0}
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
+ ARG_TERMINATOR
};
static const char * d103_symbol_from_icon_number(unsigned int n);
{GDB_OPT_VER, &gdb_opt_ver,
"Version of gdb file to generate (1,2)", "2", ARGTYPE_INT, "1", "2"},
{GDB_OPT_VIA, &gdb_opt_via,
- "Drop route points that do not have an equivalent waypoint (hidden points)", NULL, ARGTYPE_BOOL},
- {0, 0, 0, 0, 0}
+ "Drop route points that do not have an equivalent waypoint (hidden points)", NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
+ ARG_TERMINATOR
};
/********************************************************************************************************/
static
arglist_t geo_args[] = {
- {"deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING },
- {"nuke_placer", &nuke_placer, "Omit Placer name", NULL, ARGTYPE_BOOL },
- {0, 0, 0, 0, 0}
+ {"deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING, ARG_NOMINMAX },
+ {"nuke_placer", &nuke_placer, "Omit Placer name", NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+ ARG_TERMINATOR
};
#define MYNAME "geo"
static
arglist_t Args[] = {
{"dbname", &Arg_dbname,
- "Database name (filename)", NULL, ARGTYPE_STRING },
+ "Database name (filename)", NULL, ARGTYPE_STRING, ARG_NOMINMAX },
{"category", &Arg_category,
- "Category name (Cache)", NULL, ARGTYPE_STRING },
- {0, 0, 0, 0, 0 }
+ "Category name (Cache)", NULL, ARGTYPE_STRING, ARG_NOMINMAX },
+ ARG_TERMINATOR
};
#define ARG_FREE(X) do { if (X) { xfree(X); X = NULL; } } while (0)
int icon;
char *notes;
char gid[6+1];
- struct tm tm = {0};
+ struct tm tm;
+
+ memset(&tm, 0, sizeof(tm));
wpt = waypt_new();
if (!wpt)
static
arglist_t glogbook_args[] = {
- {0, 0, 0, 0, 0}
+ ARG_TERMINATOR
};
/* Tracks */
static
arglist_t my_args[] = {
- {"dbname", &dbname, "Database name", NULL, ARGTYPE_STRING},
- {0, 0, 0, 0, 0}
+ {"dbname", &dbname, "Database name", NULL, ARGTYPE_STRING, ARG_NOMINMAX},
+ ARG_TERMINATOR
};
static void
static
arglist_t gpspilot_args[] = {
- {"dbname", &dbname, "Database name", NULL, ARGTYPE_STRING},
- {0, 0, 0, 0, 0}
+ {"dbname", &dbname, "Database name", NULL, ARGTYPE_STRING, ARG_NOMINMAX},
+ ARG_TERMINATOR
};
static void
*/
tag_mapping tag_path_map[] = {
- { tt_gpx, 0, "/gpx" },
- { tt_name, 0, "/gpx/name" },
- { tt_desc, 0, "/gpx/desc" },
- { tt_author, 0, "/gpx/author" },
- { tt_email, 0, "/gpx/email" },
- { tt_url, 0, "/gpx/url" },
- { tt_urlname, 0, "/gpx/urlname" },
- { tt_keywords, 0, "/gpx/keywords" },
-
- { tt_wpt, 0, "/gpx/wpt" },
- { tt_wpt_ele, 0, "/gpx/wpt/ele" },
- { tt_wpt_time, 0, "/gpx/wpt/time" },
- { tt_wpt_name, 0, "/gpx/wpt/name" },
- { tt_wpt_cmt, 0, "/gpx/wpt/cmt" },
- { tt_wpt_desc, 0, "/gpx/wpt/desc" },
- { tt_wpt_url, 0, "/gpx/wpt/url" },
- { tt_wpt_urlname, 0, "/gpx/wpt/urlname" },
- { tt_wpt_link, 0, "/gpx/wpt/link" }, /* GPX 1.1 */
- { tt_wpt_link_text, 0, "/gpx/wpt/link/text" }, /* GPX 1.1 */
- { tt_wpt_sym, 0, "/gpx/wpt/sym" },
- { tt_wpt_type, 1, "/gpx/wpt/type" },
- { tt_cache, 1, "/gpx/wpt/groundspeak:cache" },
- { tt_cache_name, 1, "/gpx/wpt/groundspeak:cache/groundspeak:name" },
- { tt_cache_container, 1, "/gpx/wpt/groundspeak:cache/groundspeak:container" },
- { tt_cache_type, 1, "/gpx/wpt/groundspeak:cache/groundspeak:type" },
- { tt_cache_difficulty, 1, "/gpx/wpt/groundspeak:cache/groundspeak:difficulty" },
- { tt_cache_terrain, 1, "/gpx/wpt/groundspeak:cache/groundspeak:terrain" },
- { tt_cache_hint, 1, "/gpx/wpt/groundspeak:cache/groundspeak:encoded_hints" },
- { tt_cache_desc_short, 1, "/gpx/wpt/groundspeak:cache/groundspeak:short_description" },
- { tt_cache_desc_long, 1, "/gpx/wpt/groundspeak:cache/groundspeak:long_description" },
- { tt_cache_log_wpt, 1, "/gpx/wpt/groundspeak:cache/groundspeak:logs/groundspeak:log/groundspeak:log_wpt" },
- { tt_cache_log_type, 1, "/gpx/wpt/groundspeak:cache/groundspeak:logs/groundspeak:log/groundspeak:type" },
- { tt_cache_log_date, 1, "/gpx/wpt/groundspeak:cache/groundspeak:logs/groundspeak:log/groundspeak:date" },
- { tt_cache_placer, 1, "/gpx/wpt/groundspeak:cache/groundspeak:owner" },
-
- { tt_rte, 0, "/gpx/rte" },
- { tt_rte_name, 0, "/gpx/rte/name" },
- { tt_rte_desc, 0, "/gpx/rte/desc" },
- { tt_rte_number, 0, "/gpx/rte/number" },
- { tt_rte_rtept, 0, "/gpx/rte/rtept" },
- { tt_rte_rtept_ele, 0, "/gpx/rte/rtept/ele" },
- { tt_rte_rtept_time, 0, "/gpx/rte/rtept/time" },
- { tt_rte_rtept_name, 0, "/gpx/rte/rtept/name" },
- { tt_rte_rtept_cmt, 0, "/gpx/rte/rtept/cmt" },
- { tt_rte_rtept_desc, 0, "/gpx/rte/rtept/desc" },
- { tt_rte_rtept_url, 0, "/gpx/rte/rtept/url" },
- { tt_rte_rtept_urlname, 0, "/gpx/rte/rtept/urlname" },
- { tt_rte_rtept_sym, 0, "/gpx/rte/rtept/sym" },
-
- { tt_trk, 0, "/gpx/trk" },
- { tt_trk_name, 0, "/gpx/trk/name" },
- { tt_trk_desc, 0, "/gpx/trk/desc" },
- { tt_trk_trkseg, 0, "/gpx/trk/trkseg" },
- { tt_trk_number, 0, "/gpx/trk/number" },
- { tt_trk_trkseg_trkpt, 0, "/gpx/trk/trkseg/trkpt" },
- { tt_trk_trkseg_trkpt_ele, 0, "/gpx/trk/trkseg/trkpt/ele" },
- { tt_trk_trkseg_trkpt_time, 0, "/gpx/trk/trkseg/trkpt/time" },
- { tt_trk_trkseg_trkpt_name, 0, "/gpx/trk/trkseg/trkpt/name" },
- { tt_trk_trkseg_trkpt_cmt, 0, "/gpx/trk/trkseg/trkpt/cmt" },
- { tt_trk_trkseg_trkpt_desc, 0, "/gpx/trk/trkseg/trkpt/desc" },
- { tt_trk_trkseg_trkpt_url, 0, "/gpx/trk/trkseg/trkpt/url" },
- { tt_trk_trkseg_trkpt_urlname, 0, "/gpx/trk/trkseg/trkpt/urlname" },
- { tt_trk_trkseg_trkpt_sym, 0, "/gpx/trk/trkseg/trkpt/sym" },
- { tt_trk_trkseg_trkpt_course, 0, "/gpx/trk/trkseg/trkpt/course" },
- { tt_trk_trkseg_trkpt_speed, 0, "/gpx/trk/trkseg/trkpt/speed" },
+ { tt_gpx, 0, "/gpx", 0UL },
+ { tt_name, 0, "/gpx/name", 0UL },
+ { tt_desc, 0, "/gpx/desc", 0UL },
+ { tt_author, 0, "/gpx/author", 0UL },
+ { tt_email, 0, "/gpx/email", 0UL },
+ { tt_url, 0, "/gpx/url", 0UL },
+ { tt_urlname, 0, "/gpx/urlname", 0UL },
+ { tt_keywords, 0, "/gpx/keywords", 0UL },
+
+ { tt_wpt, 0, "/gpx/wpt", 0UL },
+ { tt_wpt_ele, 0, "/gpx/wpt/ele", 0UL },
+ { tt_wpt_time, 0, "/gpx/wpt/time", 0UL },
+ { tt_wpt_name, 0, "/gpx/wpt/name", 0UL },
+ { tt_wpt_cmt, 0, "/gpx/wpt/cmt", 0UL },
+ { tt_wpt_desc, 0, "/gpx/wpt/desc", 0UL },
+ { tt_wpt_url, 0, "/gpx/wpt/url", 0UL },
+ { tt_wpt_urlname, 0, "/gpx/wpt/urlname", 0UL },
+ { tt_wpt_link, 0, "/gpx/wpt/link", 0UL }, /* GPX 1.1 */
+ { tt_wpt_link_text, 0, "/gpx/wpt/link/text", 0UL }, /* GPX 1.1 */
+ { tt_wpt_sym, 0, "/gpx/wpt/sym", 0UL },
+ { tt_wpt_type, 1, "/gpx/wpt/type", 0UL },
+ { tt_cache, 1, "/gpx/wpt/groundspeak:cache", 0UL },
+ { tt_cache_name, 1, "/gpx/wpt/groundspeak:cache/groundspeak:name", 0UL },
+ { tt_cache_container, 1, "/gpx/wpt/groundspeak:cache/groundspeak:container", 0UL },
+ { tt_cache_type, 1, "/gpx/wpt/groundspeak:cache/groundspeak:type", 0UL },
+ { tt_cache_difficulty, 1, "/gpx/wpt/groundspeak:cache/groundspeak:difficulty", 0UL },
+ { tt_cache_terrain, 1, "/gpx/wpt/groundspeak:cache/groundspeak:terrain", 0UL },
+ { tt_cache_hint, 1, "/gpx/wpt/groundspeak:cache/groundspeak:encoded_hints", 0UL },
+ { tt_cache_desc_short, 1, "/gpx/wpt/groundspeak:cache/groundspeak:short_description", 0UL },
+ { tt_cache_desc_long, 1, "/gpx/wpt/groundspeak:cache/groundspeak:long_description", 0UL },
+ { tt_cache_log_wpt, 1, "/gpx/wpt/groundspeak:cache/groundspeak:logs/groundspeak:log/groundspeak:log_wpt", 0UL },
+ { tt_cache_log_type, 1, "/gpx/wpt/groundspeak:cache/groundspeak:logs/groundspeak:log/groundspeak:type", 0UL },
+ { tt_cache_log_date, 1, "/gpx/wpt/groundspeak:cache/groundspeak:logs/groundspeak:log/groundspeak:date", 0UL },
+ { tt_cache_placer, 1, "/gpx/wpt/groundspeak:cache/groundspeak:owner", 0UL },
+
+ { tt_rte, 0, "/gpx/rte", 0UL },
+ { tt_rte_name, 0, "/gpx/rte/name", 0UL },
+ { tt_rte_desc, 0, "/gpx/rte/desc", 0UL },
+ { tt_rte_number, 0, "/gpx/rte/number", 0UL },
+ { tt_rte_rtept, 0, "/gpx/rte/rtept", 0UL },
+ { tt_rte_rtept_ele, 0, "/gpx/rte/rtept/ele", 0UL },
+ { tt_rte_rtept_time, 0, "/gpx/rte/rtept/time", 0UL },
+ { tt_rte_rtept_name, 0, "/gpx/rte/rtept/name", 0UL },
+ { tt_rte_rtept_cmt, 0, "/gpx/rte/rtept/cmt", 0UL },
+ { tt_rte_rtept_desc, 0, "/gpx/rte/rtept/desc", 0UL },
+ { tt_rte_rtept_url, 0, "/gpx/rte/rtept/url", 0UL },
+ { tt_rte_rtept_urlname, 0, "/gpx/rte/rtept/urlname", 0UL },
+ { tt_rte_rtept_sym, 0, "/gpx/rte/rtept/sym", 0UL },
+
+ { tt_trk, 0, "/gpx/trk", 0UL },
+ { tt_trk_name, 0, "/gpx/trk/name", 0UL },
+ { tt_trk_desc, 0, "/gpx/trk/desc", 0UL },
+ { tt_trk_trkseg, 0, "/gpx/trk/trkseg", 0UL },
+ { tt_trk_number, 0, "/gpx/trk/number", 0UL },
+ { tt_trk_trkseg_trkpt, 0, "/gpx/trk/trkseg/trkpt", 0UL },
+ { tt_trk_trkseg_trkpt_ele, 0, "/gpx/trk/trkseg/trkpt/ele", 0UL },
+ { tt_trk_trkseg_trkpt_time, 0, "/gpx/trk/trkseg/trkpt/time", 0UL },
+ { tt_trk_trkseg_trkpt_name, 0, "/gpx/trk/trkseg/trkpt/name", 0UL },
+ { tt_trk_trkseg_trkpt_cmt, 0, "/gpx/trk/trkseg/trkpt/cmt", 0UL },
+ { tt_trk_trkseg_trkpt_desc, 0, "/gpx/trk/trkseg/trkpt/desc", 0UL },
+ { tt_trk_trkseg_trkpt_url, 0, "/gpx/trk/trkseg/trkpt/url", 0UL },
+ { tt_trk_trkseg_trkpt_urlname, 0, "/gpx/trk/trkseg/trkpt/urlname", 0UL },
+ { tt_trk_trkseg_trkpt_sym, 0, "/gpx/trk/trkseg/trkpt/sym", 0UL },
+ { tt_trk_trkseg_trkpt_course, 0, "/gpx/trk/trkseg/trkpt/course", 0UL },
+ { tt_trk_trkseg_trkpt_speed, 0, "/gpx/trk/trkseg/trkpt/speed", 0UL },
/* Common to tracks, routes, and waypts */
- { tt_fix, 0, "/gpx/wpt/fix" },
- { tt_fix, 0, "/gpx/trk/trkseg/trkpt/fix" },
- { tt_fix, 0, "/gpx/rte/rtept/fix" },
- { tt_sat, 0, "/gpx/wpt/sat" },
- { tt_sat, 0, "/gpx/trk/trkseg/trkpt/sat" },
- { tt_sat, 0, "/gpx/rte/rtept/sat" },
- { tt_pdop, 0, "/gpx/wpt/pdop" },
- { tt_pdop, 0, "/gpx/trk/trkseg/trkpt/pdop" },
- { tt_pdop, 0, "/gpx/rte/rtept/pdop" },
- { tt_hdop, 0, "/gpx/wpt/hdop" },
- { tt_hdop, 0, "/gpx/trk/trkseg/trkpt/hdop" },
- { tt_hdop, 0, "/gpx/rte/rtept/hdop" },
- { tt_vdop, 0, "/gpx/wpt/vdop" },
- { tt_vdop, 0, "/gpx/trk/trkseg/trkpt/vdop" },
- { tt_vdop, 0, "/gpx/rte/rtept/hdop" },
- {0}
+ { tt_fix, 0, "/gpx/wpt/fix", 0UL },
+ { tt_fix, 0, "/gpx/trk/trkseg/trkpt/fix", 0UL },
+ { tt_fix, 0, "/gpx/rte/rtept/fix", 0UL },
+ { tt_sat, 0, "/gpx/wpt/sat", 0UL },
+ { tt_sat, 0, "/gpx/trk/trkseg/trkpt/sat", 0UL },
+ { tt_sat, 0, "/gpx/rte/rtept/sat", 0UL },
+ { tt_pdop, 0, "/gpx/wpt/pdop", 0UL },
+ { tt_pdop, 0, "/gpx/trk/trkseg/trkpt/pdop", 0UL },
+ { tt_pdop, 0, "/gpx/rte/rtept/pdop", 0UL },
+ { tt_hdop, 0, "/gpx/wpt/hdop", 0UL },
+ { tt_hdop, 0, "/gpx/trk/trkseg/trkpt/hdop", 0UL },
+ { tt_hdop, 0, "/gpx/rte/rtept/hdop", 0UL },
+ { tt_vdop, 0, "/gpx/wpt/vdop", 0UL },
+ { tt_vdop, 0, "/gpx/trk/trkseg/trkpt/vdop", 0UL },
+ { tt_vdop, 0, "/gpx/rte/rtept/hdop", 0UL },
+ {0, 0, NULL, 0UL}
};
static tag_type
"32", ARGTYPE_INT, "1", NULL },
{ "suppresswhite", &suppresswhite,
"Suppress whitespace in generated shortnames",
- NULL, ARGTYPE_BOOL },
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
{ "logpoint", &opt_logpoint,
"Create waypoints from geocache log entries",
- NULL, ARGTYPE_BOOL },
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
{ "urlbase", &urlbase, "Base URL for link tag in output",
- NULL, ARGTYPE_STRING},
+ NULL, ARGTYPE_STRING, ARG_NOMINMAX},
{ "gpxver", &gpx_wversion, "Target GPX version for output",
- "1.0", ARGTYPE_STRING},
- { 0, 0, 0, 0, 0 }
+ "1.0", ARGTYPE_STRING, ARG_NOMINMAX},
+ ARG_TERMINATOR
};
ff_vecs_t gpx_vecs = {
static
arglist_t gtm_args[] = {
- { 0, 0, 0, 0, 0 }
+ ARG_TERMINATOR
};
ff_vecs_t gtm_vecs = {
static
arglist_t hiketech_args[] = {
- {0, 0, 0, 0, 0}
+ ARG_TERMINATOR
};
/* Waypoints */
static
arglist_t hsa_ndv_args[] = {
- {0, 0, 0, 0, 0}
+ ARG_TERMINATOR
};
#define MYNAME "HsaNdv"
static
arglist_t html_args[] = {
{ "stylesheet", &stylesheet,
- "Path to HTML style sheet", NULL, ARGTYPE_STRING },
+ "Path to HTML style sheet", NULL, ARGTYPE_STRING, ARG_NOMINMAX },
{ "encrypt", &encrypt,
- "Encrypt hints using ROT13", NULL, ARGTYPE_BOOL },
+ "Encrypt hints using ROT13", NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
{ "logs", &includelogs,
- "Include groundspeak logs if present", NULL, ARGTYPE_BOOL },
- {0, 0, 0, 0, 0}
+ "Include groundspeak logs if present", NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+ ARG_TERMINATOR
};
static arglist_t igc_args[] = {
{"timeadj", &timeadj,
"(integer sec or 'auto') Barograph to GPS time diff",
- NULL, ARGTYPE_STRING},
- {0, 0, 0, 0, 0}
+ NULL, ARGTYPE_STRING, ARG_NOMINMAX},
+ ARG_TERMINATOR
};
ff_vecs_t igc_vecs = {
static arglist_t ignr_args[] =
{
{"index", &index_opt, "Index of track to write (if more the one in source)", NULL, ARGTYPE_INT, "1", NULL },
- {0, 0, 0, 0 }
+ ARG_TERMINATOR
};
static xg_callback ignr_start;
int32
GPS_Write_Packet_usb(int32 fd, GPS_PPacket packet)
{
- garmin_usb_packet gp = {0};
+ garmin_usb_packet gp;
+ memset(&gp, 0, sizeof(gp));
/*
static
arglist_t kml_args[] = {
- {"deficon", &opt_deficon, "Default icon name", NULL, ARGTYPE_STRING },
+ {"deficon", &opt_deficon, "Default icon name", NULL, ARGTYPE_STRING, ARG_NOMINMAX },
{"lines", &opt_export_lines,
"Export linestrings for tracks and routes",
- "1", ARGTYPE_BOOL },
+ "1", ARGTYPE_BOOL, ARG_NOMINMAX },
{"points", &opt_export_points,
"Export placemarks for tracks and routes",
- "1", ARGTYPE_BOOL },
+ "1", ARGTYPE_BOOL, ARG_NOMINMAX },
{"line_width", &opt_line_width,
"Width of lines, in pixels",
- "6", ARGTYPE_INT },
+ "6", ARGTYPE_INT, ARG_NOMINMAX },
{"line_color", &opt_line_color,
"Line color, specified in hex AABBGGRR",
- "64eeee17", ARGTYPE_STRING },
+ "64eeee17", ARGTYPE_STRING, ARG_NOMINMAX },
{"floating", &opt_floating,
"Altitudes are absolute and not clamped to ground",
- "0", ARGTYPE_BOOL },
- {0, 0, 0, 0, 0}
+ "0", ARGTYPE_BOOL, ARG_NOMINMAX },
+ ARG_TERMINATOR
};
#define MYNAME "kml"
#define UNKNOWN_USR_ALTITUDE -3048 /* -10000ft is how the unit stores unknown */
/* Jan 1, 2000 00:00:00 */
-struct tm base_time = { 0, 0, 0, 1, 0, 100, 5, 1, -1 };
+struct tm base_time = { 0, 0, 0, 1, 0, 100, 5, 1, -1, 0, 0 };
static
size_t
static
arglist_t lowranceusr_args[] = {
{"ignoreicons", &ignoreicons, "Ignore event marker icons",
- NULL, ARGTYPE_BOOL },
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
{"merge", &merge, "(USR output) Merge into one segmented track",
- NULL, ARGTYPE_BOOL },
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
{"break", &seg_break, "(USR input) Break segments into separate tracks",
- NULL, ARGTYPE_BOOL },
- {NULL, NULL, NULL, NULL, 0}
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+ ARG_TERMINATOR
};
static void
static arglist_t magpdb_args[] =
{
- {0, 0, 0, 0, 0 }
+ ARG_TERMINATOR
};
static double
static
arglist_t mag_sargs[] = {
{"baud", &bs, "Numeric value of bitrate (baud=4800)", NULL,
- ARGTYPE_INT },
+ ARGTYPE_INT, ARG_NOMINMAX },
{"maxcmts", &cmts, "Max number of comments to write (maxcmts=200)",
- NULL, ARGTYPE_INT },
+ NULL, ARGTYPE_INT, ARG_NOMINMAX },
{"noack", &noack, "Suppress use of handshaking in name of speed",
- NULL, ARGTYPE_BOOL},
- {"deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING },
- {"nukewpt", &nukewpt, "Delete all waypoints", NULL, ARGTYPE_BOOL },
- {0, 0, 0, 0, 0}
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
+ {"deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING,
+ ARG_NOMINMAX },
+ {"nukewpt", &nukewpt, "Delete all waypoints", NULL, ARGTYPE_BOOL,
+ ARG_NOMINMAX },
+ ARG_TERMINATOR
};
static
arglist_t mag_fargs[] = {
- {"deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING },
+ {"deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING,
+ ARG_NOMINMAX },
{"maxcmts", &cmts, "Max number of comments to write (maxcmts=200)",
- NULL, ARGTYPE_INT },
- {"deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING },
- {0, 0, 0, 0, 0}
+ NULL, ARGTYPE_INT, ARG_NOMINMAX },
+ {"deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING,
+ ARG_NOMINMAX },
+ ARG_TERMINATOR
};
static void
arglist_t mps_args[] = {
{"snlen", &snlen, "Length of generated shortnames", "10", ARGTYPE_INT, "1", NULL },
{ "snwhite", &snwhiteopt, "Allow whitespace synth. shortnames",
- NULL, ARGTYPE_BOOL},
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
{"mpsverout", &mpsverout,
"Version of mapsource file to generate (3,4,5)", NULL,
- ARGTYPE_INT },
+ ARGTYPE_INT, ARG_NOMINMAX },
{"mpsmergeout", &mpsmergeouts, "Merge output with existing file",
- NULL, ARGTYPE_BOOL },
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
{"mpsusedepth", &mpsusedepth,
"Use depth values on output (default is ignore)", NULL,
- ARGTYPE_BOOL },
+ ARGTYPE_BOOL, ARG_NOMINMAX },
{"mpsuseprox", &mpsuseprox,
"Use proximity values on output (default is ignore)",
- NULL, ARGTYPE_BOOL },
- {0, 0, 0, 0, 0}
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+ ARG_TERMINATOR
};
/*
static arglist_t msroute_args[] =
{
- {0, 0, 0, 0, 0 }
+ ARG_TERMINATOR
};
/* MS-AutoRoute structures */
static
arglist_t nav_args[] = {
{"noretired", &noretired, "Suppress retired geocaches",
- NULL, ARGTYPE_BOOL },
- {0, 0, 0, 0, 0}
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+ ARG_TERMINATOR
};
#define MYNAME "navicache"
static
arglist_t netstumbler_args[] = {
{"nseicon", &nseicon, "Non-stealth encrypted icon name",
- "Red Square", ARGTYPE_STRING },
+ "Red Square", ARGTYPE_STRING, ARG_NOMINMAX },
{"nsneicon", &nsneicon, "Non-stealth non-encrypted icon name",
- "Green Square", ARGTYPE_STRING },
+ "Green Square", ARGTYPE_STRING, ARG_NOMINMAX },
{"seicon", &seicon, "Stealth encrypted icon name",
- "Red Diamond", ARGTYPE_STRING },
+ "Red Diamond", ARGTYPE_STRING, ARG_NOMINMAX },
{"sneicon", &sneicon, "Stealth non-encrypted icon name",
- "Green Diamond", ARGTYPE_STRING },
- {"snmac", &snmac, "Shortname is MAC address", NULL, ARGTYPE_BOOL },
- {0, 0, 0, 0, 0}
+ "Green Diamond", ARGTYPE_STRING, ARG_NOMINMAX },
+ {"snmac", &snmac, "Shortname is MAC address", NULL, ARGTYPE_BOOL,
+ ARG_NOMINMAX },
+ ARG_TERMINATOR
};
static void
int stealth_num = 0, whitespace_num = 0;
long flags = 0;
int speed = 0, channel = 0;
- struct tm tm = {0};
+ struct tm tm;
+
+ memset(&tm, 0, sizeof(tm));
for(; fgets(ibuf, sizeof(ibuf), file_in);) {
char *field;
static char *optdate = NULL;
arglist_t nmea_args[] = {
- {"gprmc", &dogprmc, "Write GPRMC sentences", NULL, ARGTYPE_BOOL },
+ {"gprmc", &dogprmc, "Write GPRMC sentences", NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
{"snlen", &snlenopt, "Max length of waypoint name to write", "6", ARGTYPE_INT, "1", "64" },
- {"nogpgga", &nogpgga, "Don't write GPGGA sentences", NULL, ARGTYPE_BOOL },
- {"nogpvtg", &nogpvtg, "Don't write GPVTG sentences", NULL, ARGTYPE_BOOL },
- {"nogpgsa", &nogpgsa, "Don't write GPGSA sentences", NULL, ARGTYPE_BOOL },
- {"date", &optdate, "Complete date-free tracks with given date (YYYYMMDD).", NULL, ARGTYPE_INT },
- {0, 0, 0, 0 }
+ {"nogpgga", &nogpgga, "Don't write GPGGA sentences", NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+ {"nogpvtg", &nogpvtg, "Don't write GPVTG sentences", NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+ {"nogpgsa", &nogpgsa, "Don't write GPGSA sentences", NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+ {"date", &optdate, "Complete date-free tracks with given date (YYYYMMDD).", NULL, ARGTYPE_INT, ARG_NOMINMAX },
+ ARG_TERMINATOR
};
/*
static
arglist_t nmn4_args[] = {
{"index", &index_opt, "Index of route to write (if more the one in source)", NULL, ARGTYPE_INT, "1", NULL },
- {0, 0, 0, 0, 0}
+ ARG_TERMINATOR
};
static
arglist_t nuke_args[] = {
{"waypoints", &nukewpts, "Remove all waypoints from data stream",
- "0", ARGTYPE_BOOL} ,
+ "0", ARGTYPE_BOOL, ARG_NOMINMAX} ,
{"tracks", &nuketrks, "Remove all tracks from data stream",
- "0", ARGTYPE_BOOL} ,
+ "0", ARGTYPE_BOOL, ARG_NOMINMAX} ,
{"routes", &nukertes, "Remove all routes from data stream",
- "0", ARGTYPE_BOOL} ,
- {0, 0, 0, 0, 0}
+ "0", ARGTYPE_BOOL, ARG_NOMINMAX} ,
+ ARG_TERMINATOR
};
static void
{ "size", &govl_size_s, "size index [101-] for routes",
NULL, ARGTYPE_INT, "101", NULL },
{ "mapname", &govl_mapname, "name of map",
- NULL, ARGTYPE_STRING },
+ NULL, ARGTYPE_STRING, ARG_NOMINMAX },
{ "zoomfc", &govl_zoomfc_s, "zoom factor of map in %",
- NULL, ARGTYPE_INT },
+ NULL, ARGTYPE_INT, ARG_NOMINMAX },
{ "dimmfc", &govl_dimmfc_s, "dimmer factor of map in %",
- NULL, ARGTYPE_INT },
+ NULL, ARGTYPE_INT, ARG_NOMINMAX },
{ "txtcol", &govl_txtcol_s, "color index [1-9] for waypoint names",
NULL, ARGTYPE_INT, "1", "9" },
{ "txtsize", &govl_txtsize_s, "text size [101-] for waypoint names",
{ "font", &govl_font_s, "font index [1-] for waypoint names",
NULL, ARGTYPE_INT, "1", NULL },
{ "txttrans", &govl_txttrans_s, "set text background to transparent",
- NULL, ARGTYPE_BOOL },
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
{ "file", &govl_file_s, "use file of parameters (parameters on command line overwrites file parameters)",
- NULL, ARGTYPE_STRING },
- { 0, 0, 0, 0, 0 }
+ NULL, ARGTYPE_STRING, ARG_NOMINMAX },
+ ARG_TERMINATOR
};
{"snlen", &snlenopt, "Max synthesized shortname length",
"32", ARGTYPE_INT, "1", NULL},
{"snwhite", &snwhiteopt, "Allow whitespace synth. shortnames",
- NULL, ARGTYPE_BOOL},
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
{"snupper", &snupperopt, "UPPERCASE synth. shortnames",
- NULL, ARGTYPE_BOOL},
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
{"snunique", &snuniqueopt, "Make synth. shortnames unique",
- NULL, ARGTYPE_BOOL},
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
{"wptfgcolor", &wptfgcolor, "Waypoint foreground color",
- "black", ARGTYPE_STRING},
+ "black", ARGTYPE_STRING, ARG_NOMINMAX},
{"wptbgcolor", &wptbgcolor, "Waypoint background color",
- "yellow", ARGTYPE_STRING},
- {0, 0, 0, 0, 0}
+ "yellow", ARGTYPE_STRING, ARG_NOMINMAX},
+ ARG_TERMINATOR
};
static gpsdata_type ozi_objective;
arglist_t palmdoc_args[] = {
{ "nosep", &suppresssep,
"Suppress separator lines between waypoints", NULL,
- ARGTYPE_BOOL },
- {"dbname", &dbname, "Database name", NULL, ARGTYPE_STRING },
+ ARGTYPE_BOOL, ARG_NOMINMAX },
+ {"dbname", &dbname, "Database name", NULL, ARGTYPE_STRING, ARG_NOMINMAX },
{"encrypt", &encrypt, "Encrypt hints with ROT13", NULL,
- ARGTYPE_BOOL },
+ ARGTYPE_BOOL, ARG_NOMINMAX },
{ "logs", &includelogs,
- "Include groundspeak logs if present", NULL, ARGTYPE_BOOL },
+ "Include groundspeak logs if present", NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
{ "bookmarks_short", &bmid, "Include short name in bookmarks",
- NULL, ARGTYPE_BOOL },
- {0, 0, 0, 0, 0}
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+ ARG_TERMINATOR
};
static struct buffer buf;
static arglist_t ppdb_args[] =
{
- {"dbname", &dbname, "Database name", NULL, ARGTYPE_STRING},
- {"deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING},
+ {"dbname", &dbname, "Database name", NULL, ARGTYPE_STRING, ARG_NOMINMAX},
+ {"deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING, ARG_NOMINMAX},
{"snlen", &snlen_opt, "Length of generated shortnames", "10", ARGTYPE_INT, "1", NULL },
- {0, 0, 0, 0, 0 }
+ ARG_TERMINATOR
};
#undef PPDB_DEBUG
static
arglist_t pcx_args[] = {
{"deficon", &deficon, "Default icon name", "Waypoint",
- ARGTYPE_STRING },
+ ARGTYPE_STRING, ARG_NOMINMAX },
{"cartoexploreur", &cartoexploreur,
"Write tracks compatible with Carto Exploreur", "",
- ARGTYPE_BOOL },
- {0, 0, 0, 0, 0}
+ ARGTYPE_BOOL, ARG_NOMINMAX },
+ ARG_TERMINATOR
};
static void
static
arglist_t polygon_args[] = {
{"file", &polyfileopt, "File containing vertices of polygon",
- NULL, ARGTYPE_FILE | ARGTYPE_REQUIRED },
+ NULL, ARGTYPE_FILE | ARGTYPE_REQUIRED, ARG_NOMINMAX },
{"exclude", &exclopt, "Exclude points inside the polygon",
- NULL, ARGTYPE_BOOL },
- {0, 0, 0, 0, 0}
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+ ARG_TERMINATOR
};
static void polytest ( double lat1, double lon1,
static
arglist_t position_args[] = {
{"distance", &distopt, "Maximum positional distance",
- NULL, ARGTYPE_FLOAT | ARGTYPE_REQUIRED },
+ NULL, ARGTYPE_FLOAT | ARGTYPE_REQUIRED, ARG_NOMINMAX },
{"all", &purge_duplicates,
"Suppress all points close to other points",
- NULL, ARGTYPE_BOOL },
- {0, 0, 0, 0, 0}
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+ ARG_TERMINATOR
};
static
arglist_t radius_args[] = {
{"lat", &latopt, "Latitude for center point (D.DDDDD)",
- NULL, ARGTYPE_FLOAT | ARGTYPE_REQUIRED },
+ NULL, ARGTYPE_FLOAT | ARGTYPE_REQUIRED, ARG_NOMINMAX },
{"lon", &lonopt, "Longitude for center point (D.DDDDD)",
- NULL, ARGTYPE_FLOAT | ARGTYPE_REQUIRED },
+ NULL, ARGTYPE_FLOAT | ARGTYPE_REQUIRED, ARG_NOMINMAX },
{"distance", &distopt, "Maximum distance from center",
- NULL, ARGTYPE_FLOAT | ARGTYPE_REQUIRED },
+ NULL, ARGTYPE_FLOAT | ARGTYPE_REQUIRED, ARG_NOMINMAX },
{"exclude", &exclopt, "Exclude points close to center",
- NULL, ARGTYPE_BOOL },
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
{"nosort", &nosort, "Inhibit sort by distance to center",
- NULL, ARGTYPE_BOOL },
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
{"maxcount", &maxctarg,"Output no more than this number of points",
NULL, ARGTYPE_INT, "1", NULL },
{"asroute", &routename,"Put resulting waypoints in route of this name",
NULL, ARGTYPE_STRING, NULL, NULL },
- {0, 0, 0, 0, 0}
+ ARG_TERMINATOR
};
static double
arglist_t psit_args[] = {
/* {"snlen", &snlen, "Length of generated shortnames",
NULL, ARGTYPE_INT, "1", NULL }, */
- {0, 0, 0, 0, 0}
+ ARG_TERMINATOR
};
/* Taken from PsiTrex 1.13 */
static
arglist_t quovadis_args[] = {
- {"dbname", &dbname, "Database name", NULL, ARGTYPE_STRING},
- {0, 0, 0, 0, 0}
+ {"dbname", &dbname, "Database name", NULL, ARGTYPE_STRING, ARG_NOMINMAX},
+ ARG_TERMINATOR
};
static struct qv_icon_mapping mapping[] = {
static
arglist_t reverse_route_args[] = {
- {0, 0, 0, 0, 0}
+ ARG_TERMINATOR
};
void
arglist_t saroute_args[] = {
{"turns_important", &turns_important,
"Keep turns if simplify filter is used",
- NULL, ARGTYPE_BOOL },
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
{"turns_only", &turns_only, "Only read turns; skip all other points",
- NULL, ARGTYPE_BOOL },
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
{"split", &split, "Split into multiple routes at turns",
- NULL, ARGTYPE_BOOL },
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
{"controls", &controls, "Read control points as waypoint/route/none",
- "none", ARGTYPE_STRING },
- {0, 0, 0, 0 }
+ "none", ARGTYPE_STRING, ARG_NOMINMAX },
+ ARG_TERMINATOR
};
unsigned short
arglist_t shp_args[] = {
{"name", &opt_name, "Index of name field in .dbf",
NULL, ARGTYPE_INT, "0", NULL },
- { 0, 0, 0, 0}
+ ARG_TERMINATOR
};
static void
{"error", &erroropt, "Maximum error", NULL,
ARGTYPE_STRING | ARGTYPE_END_REQ | ARGTYPE_END_EXCL, "0", NULL},
{"crosstrack", &xteopt, "Use cross-track error (default)", NULL,
- ARGTYPE_BOOL | ARGTYPE_BEGIN_EXCL, NULL, NULL },
+ ARGTYPE_BOOL | ARGTYPE_BEGIN_EXCL, ARG_NOMINMAX },
{"length", &lenopt, "Use arclength error", NULL,
- ARGTYPE_BOOL | ARGTYPE_END_EXCL, NULL, NULL },
- {0, 0, 0, 0, 0}
+ ARGTYPE_BOOL | ARGTYPE_END_EXCL, ARG_NOMINMAX },
+ ARG_TERMINATOR
};
struct xte_intermed;
static
arglist_t sort_args[] = {
{"gcid", &opt_sm_gcid, "Sort by numeric geocache ID",
- NULL, ARGTYPE_BOOL },
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
{"shortname", &opt_sm_shortname, "Sort by waypoint short name",
- NULL, ARGTYPE_BOOL },
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
{"description", &opt_sm_description, "Sort by waypoint description",
- NULL, ARGTYPE_BOOL },
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
{"time", &opt_sm_time, "Sort by time",
- NULL, ARGTYPE_BOOL },
- {0, 0, 0, 0, 0}
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+ ARG_TERMINATOR
};
static int
static
arglist_t stackfilt_args[] = {
{"push", &opt_push, "Push waypoint list onto stack", NULL,
- ARGTYPE_BEGIN_EXCL | ARGTYPE_BEGIN_REQ | ARGTYPE_BOOL},
+ ARGTYPE_BEGIN_EXCL | ARGTYPE_BEGIN_REQ | ARGTYPE_BOOL, ARG_NOMINMAX},
{"pop", &opt_pop, "Pop waypoint list from stack", NULL,
- ARGTYPE_BOOL},
+ ARGTYPE_BOOL, ARG_NOMINMAX},
{"swap", &opt_swap, "Swap waypoint list with <depth> item on stack",
- NULL, ARGTYPE_END_EXCL | ARGTYPE_END_REQ | ARGTYPE_BOOL},
+ NULL, ARGTYPE_END_EXCL | ARGTYPE_END_REQ | ARGTYPE_BOOL, ARG_NOMINMAX},
{"copy", &opt_copy, "(push) Copy waypoint list", NULL,
- ARGTYPE_BOOL},
+ ARGTYPE_BOOL, ARG_NOMINMAX},
{"append", &opt_append, "(pop) Append list", NULL,
- ARGTYPE_BEGIN_EXCL | ARGTYPE_BOOL},
+ ARGTYPE_BEGIN_EXCL | ARGTYPE_BOOL, ARG_NOMINMAX},
{"discard", &opt_discard, "(pop) Discard top of stack",
- NULL, ARGTYPE_BOOL},
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
{"replace", &opt_replace, "(pop) Replace list (default)",
- NULL, ARGTYPE_END_EXCL | ARGTYPE_BOOL},
+ NULL, ARGTYPE_END_EXCL | ARGTYPE_BOOL, ARG_NOMINMAX},
{"depth", &opt_depth, "(swap) Item to use (default=1)",
NULL, ARGTYPE_INT, "0", NULL},
{"nowarn", &nowarn, "Suppress cleanup warning", NULL,
- ARGTYPE_BOOL | ARGTYPE_HIDDEN},
- {0, 0, 0, 0, 0}
+ ARGTYPE_BOOL | ARGTYPE_HIDDEN, ARG_NOMINMAX},
+ ARG_TERMINATOR
};
struct stack_elt {
{
{"index", &index_opt, "Index of route/track to write (if more the one in source)",
NULL, ARGTYPE_INT, "1", NULL },
- {0, 0, 0, 0, 0}
+ ARG_TERMINATOR
};
static arglist_t tef_xml_args[] =
{
- {"routevia", &routevia, "Include only via stations in route", NULL, ARGTYPE_BOOL},
- {0, 0, 0, 0 }
+ {"routevia", &routevia, "Include only via stations in route", NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
+ ARG_TERMINATOR
};
#define MYNAME "TourExchangeFormat"
arglist_t text_args[] = {
{ "nosep", &suppresssep,
"Suppress separator lines between waypoints",
- NULL, ARGTYPE_BOOL },
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
{ "encrypt", &encrypt,
- "Encrypt hints using ROT13", NULL, ARGTYPE_BOOL },
+ "Encrypt hints using ROT13", NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
{ "logs", &includelogs,
- "Include groundspeak logs if present", NULL, ARGTYPE_BOOL },
- {0, 0, 0, 0, 0}
+ "Include groundspeak logs if present", NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+ ARG_TERMINATOR
};
static
arglist_t tiger_args[] = {
{"nolabels", &nolabels, "Suppress labels on generated pins",
- NULL, ARGTYPE_BOOL },
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
{"genurl", &genurl, "Generate file with lat/lon for centering map",
- NULL, ARGTYPE_OUTFILE },
+ NULL, ARGTYPE_OUTFILE, ARG_NOMINMAX },
{"margin", &margin, "Margin for map. Degrees or percentage",
- "15%", ARGTYPE_FLOAT},
+ "15%", ARGTYPE_FLOAT, ARG_NOMINMAX},
{"snlen", &snlen, "Max shortname length when used with -s",
"10", ARGTYPE_INT, "1", NULL},
{"oldthresh", &oldthresh,
"Days after which points are considered old",
- "14", ARGTYPE_INT},
+ "14", ARGTYPE_INT, ARG_NOMINMAX},
{"oldmarker", &oldmarker, "Marker type for old points",
- "redpin", ARGTYPE_STRING},
+ "redpin", ARGTYPE_STRING, ARG_NOMINMAX},
{"newmarker", &newmarker, "Marker type for new points",
- "greenpin", ARGTYPE_STRING},
+ "greenpin", ARGTYPE_STRING, ARG_NOMINMAX},
{"suppresswhite", &suppresswhite,
"Suppress whitespace in generated shortnames",
- NULL, ARGTYPE_BOOL },
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
{"unfoundmarker", &unfoundmarker, "Marker type for unfound points",
- "bluepin", ARGTYPE_STRING},
+ "bluepin", ARGTYPE_STRING, ARG_NOMINMAX},
{"xpixels", &xpixels, "Width in pixels of map",
- "768", ARGTYPE_INT},
+ "768", ARGTYPE_INT, ARG_NOMINMAX},
{"ypixels", &ypixels, "Height in pixels of map",
- "768", ARGTYPE_INT},
+ "768", ARGTYPE_INT, ARG_NOMINMAX},
{"iconismarker", &iconismarker,
"The icon description is already the marker", NULL,
- ARGTYPE_BOOL },
+ ARGTYPE_BOOL, ARG_NOMINMAX },
#if CLICKMAP
{"clickmap", &clickmap, "Generate Clickable map web page",
- NULL, ARGTYPE_BOOL},
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
#endif
- {0, 0, 0, 0, 0}
+ ARG_TERMINATOR
};
static
arglist_t tomtom_args[] = {
- {0, 0, 0, 0 }
+ ARG_TERMINATOR
};
static void
static
arglist_t tpg_args[] = {
- {"datum", &tpg_datum_opt, "Datum (default=NAD27)", "N. America 1927 mean", ARGTYPE_STRING },
- {0, 0, 0, 0, 0}
+ {"datum", &tpg_datum_opt, "Datum (default=NAD27)", "N. America 1927 mean", ARGTYPE_STRING, ARG_NOMINMAX },
+ ARG_TERMINATOR
};
static int
static
arglist_t tpo_args[] = {
{ "dumpheader", &dumpheader, "Display the file header bytes",
- "0", ARGTYPE_BOOL} ,
+ "0", ARGTYPE_BOOL, ARG_NOMINMAX} ,
{ "state", &output_state, "State map format to write, default=CA",
- "CA", ARGTYPE_STRING} ,
- {0, 0, 0, 0, 0}
+ "CA", ARGTYPE_STRING, ARG_NOMINMAX} ,
+ ARG_TERMINATOR
};
static FILE *tpo_file_in;
static
arglist_t trackfilter_args[] = {
{TRACKFILTER_MOVE_OPTION, &opt_move,
- "Correct trackpoint timestamps by a delta", NULL, ARGTYPE_STRING},
+ "Correct trackpoint timestamps by a delta", NULL, ARGTYPE_STRING, ARG_NOMINMAX},
{TRACKFILTER_PACK_OPTION, &opt_pack,
- "Pack all tracks into one", NULL, ARGTYPE_BOOL},
+ "Pack all tracks into one", NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
{TRACKFILTER_SPLIT_OPTION, &opt_split,
- "Split track by date or by time interval (see README)", NULL, ARGTYPE_STRING},
+ "Split track by date or by time interval (see README)", NULL, ARGTYPE_STRING, ARG_NOMINMAX},
{TRACKFILTER_MERGE_OPTION, &opt_merge,
- "Merge multiple tracks for the same way", NULL, ARGTYPE_STRING},
+ "Merge multiple tracks for the same way", NULL, ARGTYPE_STRING, ARG_NOMINMAX},
{TRACKFILTER_START_OPTION, &opt_start,
- "Use only track points after this timestamp", NULL, ARGTYPE_INT},
+ "Use only track points after this timestamp", NULL, ARGTYPE_INT, ARG_NOMINMAX},
{TRACKFILTER_STOP_OPTION, &opt_stop,
- "Use only track points before this timestamp", NULL, ARGTYPE_INT},
+ "Use only track points before this timestamp", NULL, ARGTYPE_INT, ARG_NOMINMAX},
{TRACKFILTER_TITLE_OPTION, &opt_title,
- "Basic title for new track(s)", NULL, ARGTYPE_STRING},
- {0, 0, 0, 0, 0}
+ "Basic title for new track(s)", NULL, ARGTYPE_STRING, ARG_NOMINMAX},
+ ARG_TERMINATOR
};
static
arglist_t unicsv_args[] = {
- {0, 0, 0, 0, 0}
+ ARG_TERMINATOR
};
/* helpers */
static
arglist_t vcf_args[] = {
{ "encrypt", &encrypt,
- "Encrypt hints using ROT13", NULL, ARGTYPE_BOOL },
- {0, 0, 0, 0, 0}
+ "Encrypt hints using ROT13", NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+ ARG_TERMINATOR
};
static void
double lonrad =0;
double elev =0;
unsigned char* timestamp =0;
- struct tm tmStruct ={0,0,0,0,0,0,0,0,0};
+ struct tm tmStruct;
double seconds =0.0;
double speed =0.0;
double course =0.0;
unsigned char gpssats =0;
int serial =0;
-
+
+ memset(&tmStruct, 0, sizeof(tmStruct));
/*
* 24 bytes header
*/
static
arglist_t xcsv_args[] = {
{"style", &styleopt, "Full path to XCSV style file", NULL,
- ARGTYPE_FILE | ARGTYPE_REQUIRED },
+ ARGTYPE_FILE | ARGTYPE_REQUIRED, ARG_NOMINMAX },
{"snlen", &snlenopt, "Max synthesized shortname length", NULL,
ARGTYPE_INT, "1", NULL},
{"snwhite", &snwhiteopt, "Allow whitespace synth. shortnames",
- NULL, ARGTYPE_BOOL},
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
{"snupper", &snupperopt, "UPPERCASE synth. shortnames",
- NULL, ARGTYPE_BOOL},
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
{"snunique", &snuniqueopt, "Make synth. shortnames unique",
- NULL, ARGTYPE_BOOL},
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
{"urlbase", &xcsv_urlbase, "Basename prepended to URL on output",
- NULL, ARGTYPE_STRING},
+ NULL, ARGTYPE_STRING, ARG_NOMINMAX},
{"prefer_shortnames", &prefer_shortnames,
"Use shortname instead of description",
- NULL, ARGTYPE_BOOL },
- {0, 0, 0, 0, 0}
+ NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+ ARG_TERMINATOR
};
/* a table of config file constants mapped to chars */
arglist_t yahoo_args[] = {
{"addrsep", &as,
"String to separate concatenated address fields (default=\", \")",
- ", ", ARGTYPE_STRING },
- {0, 0, 0, 0, 0}
+ ", ", ARGTYPE_STRING, ARG_NOMINMAX },
+ ARG_TERMINATOR
};
static xg_callback wpt_s, wpt_lat, wpt_lon, wpt_e;